#ifndef DSPSIMULATOR_PACKL4_H
#define DSPSIMULATOR_PACKL4_H

#include <dspSimulator/targetMachine/dspInstruction.h>

class PACKL4 : public DspInstruction {
public:
    explicit PACKL4(u64 address = 0, u64 baseCycle = 0) :
            DspInstruction("PACKL4", address, baseCycle, 0) {}

    ~PACKL4() override = default;

    PACKL4(const PACKL4 &packl4) = default;

    bool checkCondition(std::shared_ptr<DspMachine> dspMachine) override;

    void loadInstIRIntoJit(llvm::LLVMContext *llvmContext, llvm::Module *module,
                           std::shared_ptr<llvm::IRBuilder<>> irBuilder) override;

    std::shared_ptr<Instruction> decode(std::shared_ptr<InstInfo> instInfo, u64 baseCycle) override;

    void executeCustom(std::shared_ptr<TargetMachine> targetMachine, ExecutePhase executePhase) override;

    std::string toString() const override;

    std::shared_ptr<DspInstruction> clone() override;
};

#endif //DSPSIMULATOR_PACKL4_H
